<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>键盘修饰符</title>
</head>
<body>
<div id="app">
    <form action="">
        <label for="name">姓名
            <!--Vue  键盘修饰符可以捕获的按键：shift/enter/left/right/up/down/space/tab...-->
            <input type="text" name="name" id="name" v-on:keypress.shift="content">
        </label>
    </form>
</div>

<script type="module">
    import {createApp} from "../../../js/vue.esm-browser.js";

    let app = createApp(
        {
            setup() {
                function content(event) {
                    let element = document.querySelector("#name");
                    console.log(element.value);
                }
                return {content}
            }
        }
    );

    app.mount("#app")
</script>
</body>
</html>